﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Df.Common.Forms.JsonFormatter;
using Df.Common.Forms.Validation;
using Newtonsoft.Json;

namespace Df.Common.Forms
{
    [FluentValidation.Attributes.Validator(typeof(NumberValidation))]
    [JsonConverter(typeof(ElementConverter))]
    public class DfNumber : DfTextBox
    {
        public int? MaxLength { get; set; }
        public int? MaxVal { get; set; }
        public int? MinVal { get; set; }

        public DfNumber()
        {            
        }

        private string _invalidNumberMessage;
        public string InvalidNumberMessage
        {
            get { return _invalidNumberMessage; }
            set { _invalidNumberMessage = value; }
        }
        private string _invalidNumberRangeMessage;
        public string InvalidRangeMessage
        {
            get { return _invalidNumberRangeMessage; }
            set { _invalidNumberRangeMessage = value; }
        }
    }
}
